<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.min.js"></script>
	</head>
	<body>
		<div id="box">
			商品价格：<input type=text size=20 v-model="a">
			商品数量：<input type=text size=20 v-model="b">
			总的价格：<input type=text size=20 readonly="true" v-model="c">
		</div>
		
		<script>
			new Vue({
			el:"#box",
				data:{
					a:2.0,
					b:3,
					
				},
				
			computed: {
					c:function(){
						return this.a*this.b;
					}
				},
			})
			
			
		</script>
	</body>
</html>
